<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@page import="com.yaodian100.core.admin.utils.AdminHelper"%>
<%@taglib uri="/WEB-INF/tld/importTag.tld" prefix="importTag"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<c-rt:set var="frontHtmlPath" value='<%=ServerValue.getFrontApachePath()%>'/>
<c-rt:set var="hostName" value='<%=request.getServerName()%>'/>
<c-rt:set var="version" value='<%=ServerValue.getVersion()%>'/>
<%
String from = "yaodian100";
if(request.getCookies()!=null) {
for(Cookie c:request.getCookies()) {
	if("_from".equals(c.getName())) {
		from = c.getValue();
	}
}}

if("taobao".equals(from) || "taobao".equals(request.getAttribute("_from"))) {
%>
<div class="login-area">
<div class="taobao-login">
<script type="text/javascript" src="http://a.tbcdn.cn/app/tc/taobao.min.js" charset="gb2312"></script>
<span id="J_TaobaoBar" class="taobao-bar"></span>
<%if(AdminHelper.getMemberDetails()!=null) { %>
&nbsp;<a href="javascript:;" id="tologout">退出</a><%} %>
</div>
</div>
<script type="text/javascript">
$("#tologout").click(function(){
		window.location.href = '/ecmall/logout.do?pathparam='+encodeURIComponent('http://'+location.host+window.location.pathname+location.search);
		return false;
	});
<%if(AdminHelper.getMemberDetails()==null) {%>
Taobao.init({appKey: "12156713"});<%}else{%>
Taobao.init({appKey: "12156713", nickName: "<%=AdminHelper.getMemberDetails().getLoginId().replace("@top","")%>"});<%}%>
</script>
<%} else { %>
<importTag:static path="${frontHtmlPath}${hostName}/pages/header/loginbar.html"/>
<%}%>
<importTag:static path="${frontHtmlPath}/pages/header/logobar.html"/>